package com.skt.TFriend;

import java.util.Calendar;

import com.skt.TFriend.scheduler.Scheduler;

import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class BootCompletedReceiver extends BroadcastReceiver{
	
	private static final String TAG = "BootCompletedReceiver";	
	private AlarmManager mManager;
	
	// 부팅시 android.intent.action.BOOT_COMPLETED 받아서  알람 재 설정....
	@Override
	public void onReceive(Context context, Intent itt) {
		// TODO Auto-generated method stub
		Log.i(TAG, "onReceive : onReceive");
		// 안드로이드 OS 부팅시 alarm 재등록
//		Calendar calendar = Calendar.getInstance();
//
//		Intent intent = new Intent();
//		intent.setAction(com.skt.TFriend.util.Constants.WEATHER_ALARM_ACTION_NAME);
//		 
//		PendingIntent pIntent = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
//		mManager = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
//		mManager.setRepeating(AlarmManager.RTC, calendar.getTimeInMillis(), 60000, pIntent);
				
//		스케쥴러에서 알람셋팅  메소드 제공하도록 변경중....
//		Scheduler sdl = new Scheduler(context);
//		sdl.setAllAlarmScheduleReg();
	}

}
